package timkiem;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;

import timkiem.DB_Connector;

public class NguoiDungDAO {
	Connection con;

	public NguoiDungDAO() {
		this.con = DB_Connector.getConnection();
	}

	public  Vector<String> kiemTraDangNhap() {

		Vector<String> ten = new Vector<String>();
		try {
			PreparedStatement cauTruyVan = con
					.prepareStatement("Select * from CaSi");
			ResultSet ketqua = cauTruyVan.executeQuery();
			while (ketqua.next()) 
			{
				ten.add(ketqua.getString("TenCaSi"));
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return ten;
	}
}
